<?php
require_once("db_connection.php");

class myController
{
function getVehicleDetailsById($id)
{
	$query_veh = "SELECT veh_num, year, manufacturer_name, model_name FROM vehicle_tbl WHERE vehicle_id='".$id."'";
	$result_veh = mysql_query($query_veh) or die("SELECT VEHICLE DETAILS ".mysql_error());
	$row_veh = mysql_fetch_array($result_veh);
	
	$plate = $row_veh['veh_num'];
	$year = $row_veh['year'];
	$make = $row_veh['manufacturer_name'];
	$model = $row_veh['model_name'];
	
	$details = array("plate"=>$plate,
	"year"=>$year,
	"make"=>$make,
	"model"=>$model);

	return $details;
}
}

?>